You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds entityVelocityIsLpVec3 for Java Edition 1.21.9 and newer. These versions changed entity velocity packet fields from fixed-point vec3i16 values to lpVec3 values expressed in blocks per tick.
Mineflayer needs this boundary to avoid applying the legacy 1/8000 conversion to already-decoded lpVec3 values.
avoid applying the legacy 1/8000 conversion to already-decoded lpVec3 values.
This doesn't make sense. The underlying data is a vec3. The serialization logic should be in the special data type, not in mineflayer. Mineflayer only reads the end float
The 1/8000 conversion is in Mineflayer, not NMP. Specifically in lib/plugins/entities.js, Mineflayer always calls conv.fromNotchVelocity(notchVel) which multiplies the raw velocity integers by 1/8000 to convert to blocks/tick — the old "Notchian" encoding where velocity is sent as shorts in units of 1/8000 of a block/tick.
In 1.21.9+, Minecraft changed the entity velocity packet to use the new lpVec3 wire format. NMP's lpVec3.js decodes this into a real floating-point {x, y, z} in actual blocks/tick — no 1/8000 factor involved.
The problem: Mineflayer still blindly applies fromNotchVelocity() (×1/8000) even for these new versions, which would massively under-scale the velocity.
What the commenter means: The minecraft-data PR adds a feature flag (e.g. lpVec3EntityVelocity) so Mineflayer can check: "is this version using the new lpVec3 velocity format?" If yes → skip the ×1/8000 step. The commenter is clarifying that they didn't write the 1/8000 logic — that's pre-existing Mineflayer code — and their flag is purely a signal for Mineflayer to bypass it for newer versions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
entityVelocityIsLpVec3for Java Edition 1.21.9 and newer. These versions changed entity velocity packet fields from fixed-pointvec3i16values tolpVec3values expressed in blocks per tick.Mineflayer needs this boundary to avoid applying the legacy 1/8000 conversion to already-decoded
lpVec3values.Validation
npm testintools/js